home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / StringToBinary.au3 < prev    next >
Text File  |  2007-09-08  |  923b  |  24 lines

  1. ∩╗┐; Binary ANSI to String 
  2. $buffer = StringToBinary("Hello - Σ╜áσÑ╜")
  3. MsgBox(4096, "String() representation" , $buffer)
  4. $buffer = BinaryToString($buffer)
  5. MsgBox(4096, "BinaryToString() ANSI representation" , $buffer)
  6.  
  7. ; Binary UTF16-LE to String 
  8. $buffer = StringToBinary("Hello - Σ╜áσÑ╜", 2)
  9. MsgBox(4096, "String() representation" , $buffer)
  10. $buffer = BinaryToString($buffer, 2)
  11. MsgBox(4096, "BinaryToString() UTF16-LE representation" , $buffer)
  12.  
  13. ; Binary UTF16-BE to String 
  14. $buffer = StringToBinary("Hello - Σ╜áσÑ╜", 3)
  15. MsgBox(4096, "String() representation" , $buffer)
  16. $buffer = BinaryToString($buffer, 3)
  17. MsgBox(4096, "BinaryToString() UTF16-BE representation" , $buffer)
  18.  
  19. ; Binary UTF8 to String 
  20. $buffer = StringToBinary("Hello - Σ╜áσÑ╜", 4)
  21. MsgBox(4096, "String() representation" , $buffer)
  22. $buffer = BinaryToString($buffer, 4)
  23. MsgBox(4096, "BinaryToString() UTF8 representation" , $buffer)
  24.